<!--
 * @Description: 数据字典类型列表
 * @Autor: Zhu_liangyu
 * @Date: 2020-05-09 10:52:56
--> 
<template>
  <div>
    <page-table
      rowKey="dictionaryTypeId"
      ref="dictionaryTypePageTable"
      :query-api="dictionaryType_queryPageApi"
      :delete-api="dictionaryType_deletesApi"
      :addFormUrl="dictionaryTypeFormUrl"
      :columns="columns"
      :query-param="queryParam"
      :search-data="searchData"
    >
      <template #customCodeItemId="{text,record}">
        <router-link :to="dictionaryTypeFormUrl+'/'+record.dictionaryTypeId">
          <span>{{text}}</span>
        </router-link>
      </template>
      <template #customIsUpdate="{text}">
        <a-tag v-if="text" color="#87d068">可以更新</a-tag>
        <a-tag v-else color="#f50">不能更新</a-tag>
      </template>
    </page-table>
  </div>
</template>
<script>
import {
  dictionaryTypeFormUrl,
  dictionaryType_queryPageApi,
  dictionaryType_deletesApi,
} from "@/api/cms/dictionaryType";
import {
  dictionaryTypeTableColumns,
  dictionaryTypeQueryColumns,
} from "@/profile/cms/dictionaryType";
export default {
  data() {
    return {
      columns: dictionaryTypeTableColumns,
      searchData: dictionaryTypeQueryColumns,
      dictionaryTypeFormUrl,
      dictionaryType_queryPageApi,
      dictionaryType_deletesApi,
      queryParam: {},
    };
  },
  methods: {
    handleSearch() {
      this.$refs.dictionaryTypePageTable.reload();
    },
  },
};
</script>